Skip to content

fix: prevent command injection in install_droid()#45

Open
echobt wants to merge 1 commit intomainfrom
fix/issue-143
Open

fix: prevent command injection in install_droid()#45
echobt wants to merge 1 commit intomainfrom
fix/issue-143

Conversation

@echobt
Copy link
Copy Markdown
Contributor

@echobt echobt commented Jan 20, 2026

Description

This PR addresses a command injection vulnerability in install_droid() where file paths were directly interpolated into command strings. This could allow arbitrary code execution if the path contained shell metacharacters.

Fix

  • Replaced string interpolation with array-based command execution.
  • This ensures that paths are treated as arguments rather than executable shell commands.

Verification

  • Verified that the generated settings.json now uses an array for the command field, which Factory Droid handles safely.
  • Added a reproduction test case (locally) to confirm that the array-based approach prevents shell interpretation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant